Update AdUnit ext.
Admin-only. Replaces the entire AdUnit.ext object. The submitted ext is validated and normalized against the AdUnitExt schema; omitted fields are filled with schema defaults. Cost fields must be non-negative.
curl --request PATCH \
--url https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ext": {}
}'import requests
url = "https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext"
payload = { "ext": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ext: {}})
};
fetch('https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'ext' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext"
payload := strings.NewReader("{\n \"ext\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ext\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ext\": {}\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"ad_unit_sizes": [
{
"h": 1,
"w": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 250,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 300
},
"ext": {
"algorithm": "axa0",
"approval_method": "admin",
"bcat": [],
"default_cpa": 0,
"default_cpc": 0,
"display": {
"enabled": 0
},
"external_raw_data": "<unknown>",
"implicit_app_inference": {
"android_bundle": "<string>",
"app_name": "<string>",
"cat": [
"<string>"
],
"ios_bundle": "<string>",
"ua_keywords": []
},
"metric_mode": "all",
"native": {
"enabled": 0,
"render_mode": "html"
},
"passback": "<unknown>",
"payout": "rates",
"public_url": "<string>",
"publisher": "<unknown>",
"recommendation": {
"enabled": 0
},
"responsive": "fixed",
"target_ecpm": 0,
"target_service": "<string>",
"video": {
"enabled": 0
}
},
"gpid": "<string>",
"instl": 0,
"is_active": true,
"native": {
"assets": []
},
"no": 123,
"recommendation": {
"ext": {},
"topn": 10
},
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"api": [
32767
],
"boxing": 1,
"clktype": 1,
"comp": [
{
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 123,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 123
},
"ext": null,
"id": "<string>",
"vcm": 123
}
],
"comptype": [
"Static"
],
"ctype": [
123
],
"delay": 0,
"delivery": [
"Streaming"
],
"expdir": [
"Left"
],
"ext": null,
"h": 300,
"linear": 0,
"maxbitr": 1,
"maxdur": 0,
"maxext": 0,
"maxseq": 1,
"mime": [
"<string>"
],
"minbitr": 1,
"mincpmpersec": 123,
"mindur": 0,
"overlayexpdir": [
"Left"
],
"playend": "OnVideoCompletion",
"playmethod": [
1
],
"poddur": 1,
"podid": 1,
"podseq": 0,
"pos": "Unknown",
"ptype": 1,
"rqddurs": [
1
],
"skip": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2,
"w": 480
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication. Pass the access token in the Authorization: Bearer <token> header.
Path Parameters
Body
Show child attributes
Show child attributes
Response
Successful Response
Response schema for AdUnit mutation operations (create/patch).
Ad unit code identifier.
The ID of the user who created the ad unit.
ID of the ad unit (uuid7)
Name of the ad unit.
Hierarchical path of the ad unit (e.g., "parent_id/child_id").
Targeting metadata sizes Distinct from display/video.w/h which govern serving and rendering.
Show child attributes
Show child attributes
Description of the ad unit.
Display placement configuration.
Show child attributes
Show child attributes
Ad unit extension fields.
Show child attributes
Show child attributes
Canonical Placement ID for OpenRTB imp.ext.gpid.
Indicates if this is an interstitial placement, where 0 = no, 1 = yes. Applies across display, video, and native.
0, 1 Whether the ad unit is active.
Based on OpenRTB Native Ads 1.2 Native Markup Request Object, not the AdCOM standard native format
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Video placement configuration.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ext": {}
}'import requests
url = "https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext"
payload = { "ext": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ext: {}})
};
fetch('https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'ext' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext"
payload := strings.NewReader("{\n \"ext\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ext\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/developer/control/ad-units/{ad_unit_id}/ext")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ext\": {}\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"ad_unit_sizes": [
{
"h": 1,
"w": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 250,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 300
},
"ext": {
"algorithm": "axa0",
"approval_method": "admin",
"bcat": [],
"default_cpa": 0,
"default_cpc": 0,
"display": {
"enabled": 0
},
"external_raw_data": "<unknown>",
"implicit_app_inference": {
"android_bundle": "<string>",
"app_name": "<string>",
"cat": [
"<string>"
],
"ios_bundle": "<string>",
"ua_keywords": []
},
"metric_mode": "all",
"native": {
"enabled": 0,
"render_mode": "html"
},
"passback": "<unknown>",
"payout": "rates",
"public_url": "<string>",
"publisher": "<unknown>",
"recommendation": {
"enabled": 0
},
"responsive": "fixed",
"target_ecpm": 0,
"target_service": "<string>",
"video": {
"enabled": 0
}
},
"gpid": "<string>",
"instl": 0,
"is_active": true,
"native": {
"assets": []
},
"no": 123,
"recommendation": {
"ext": {},
"topn": 10
},
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"api": [
32767
],
"boxing": 1,
"clktype": 1,
"comp": [
{
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 123,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 123
},
"ext": null,
"id": "<string>",
"vcm": 123
}
],
"comptype": [
"Static"
],
"ctype": [
123
],
"delay": 0,
"delivery": [
"Streaming"
],
"expdir": [
"Left"
],
"ext": null,
"h": 300,
"linear": 0,
"maxbitr": 1,
"maxdur": 0,
"maxext": 0,
"maxseq": 1,
"mime": [
"<string>"
],
"minbitr": 1,
"mincpmpersec": 123,
"mindur": 0,
"overlayexpdir": [
"Left"
],
"playend": "OnVideoCompletion",
"playmethod": [
1
],
"poddur": 1,
"podid": 1,
"podseq": 0,
"pos": "Unknown",
"ptype": 1,
"rqddurs": [
1
],
"skip": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2,
"w": 480
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}